Skip to content

Fix float 16 for cuda collectives#414

Merged
nouiz merged 2 commits intoTheano:masterfrom
tsirif:fix/float_16_collectives
May 2, 2017
Merged

Fix float 16 for cuda collectives#414
nouiz merged 2 commits intoTheano:masterfrom
tsirif:fix/float_16_collectives

Conversation

@tsirif
Copy link
Copy Markdown
Contributor

@tsirif tsirif commented Apr 20, 2017

@tsirif tsirif changed the title Fix float 16 for cuda collectives [#411] Fix float 16 for cuda collectives Apr 20, 2017
Comment thread src/gpuarray_collectives_cuda_nccl.c Outdated
case GA_DOUBLE: return ncclDouble;
case GA_LONG: return ncclInt64;
case GA_ULONG: return ncclUint64;
#ifdef CUDA_HAS_HALF
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what to do if CUDA_HAS_HALF isn't defined. I think it should always be defined as we only support recent enough cuda version. So I would just remove the ifdef. Do you agree with that?

otherwise, it look good. thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is defined in nccl.h and is enabled if there is compatibility. Should I remove it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember that, but I think GA_HALF is always defined. So this cause a problem if libgpuarray support it while nccl don't. Here we don't give a good error message. Here, we request cuda 7 or more recent:

http://deeplearning.net/software/libgpuarray/installation.html#run-requirements

And CUDA_HAS_HALF is always true in that case. So I would remove the ifdef.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes don't use an ifdef switch since we load the libraries dynamically and we don't want to disable it for future loads.

@nouiz
Copy link
Copy Markdown
Member

nouiz commented May 2, 2017

I pushed the small change to this PR. If travis pass, I'll merge.

thanks

@nouiz nouiz merged commit e8e6f87 into Theano:master May 2, 2017
case GA_LONG: return ncclInt64;
case GA_ULONG: return ncclUint64;
case GA_HALF: return ncclHalf;
case GA_FLOAT16: return ncclHalf;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GA_FLOAT16 means a vector of 16 floats. This is horribly inaccurate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had asked on #411 about the types. Excuse me for the inconvenience.

@tsirif tsirif deleted the fix/float_16_collectives branch September 12, 2017 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants